import {BaseCommand} from "./BaseCommand.ts";
import {VCairnEvent} from "v-cairn";

export class BaseSeqCommand extends BaseCommand {
    public nextEvents:VCairnEvent[];

    constructor(nextEvents?:VCairnEvent[]) {
        super();
        this.nextEvents = nextEvents || [];
    }

    executeNextCommands() {
        if (this.nextEvents) {
            this.nextEvents.forEach(evt => {
                evt.emit();
            })
        }
    }
}